package com.dragon.app.design.pattern.proxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class ProxyHandler implements InvocationHandler {
	
	private Star target;
	
	public ProxyHandler(Star star) {
		target = star;
	}

	@Override
	public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
		
		System.out.println("====before invoke====");
		
		method.invoke(target, args);
		
		System.out.println("====after invoke====");
		
		return null;
	}

}
